{template 'common/header'}
<style>
.settings{
	display: none;
}
</style>
<ul class="nav nav-tabs" id="snav">
	<li class="active"><a>基础设置</a></li>
	<li><a>自定义设置</a></li>
	<li><a>分享设置</a></li>
	<li><a>审核设置</a></li>
	<li><a>七牛设置</a></li>
</ul>
<script>
$('#snav li').click(function(){
	$('#snav li').removeClass('active');
	$(this).addClass('active');
	$('.settings').hide();
	$('.settings').eq($(this).index()).show();
});
</script>
<form action="" method="post" class="form-horizontal" role="form">
	<div class="panel panel-default settings" style="display: block;">
	 	<div class="panel-heading">基础设置</div>
		<div class="panel-body">
			<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">程序标题</label>
            	<div class="col-sm-9">
                	<input class='form-control' name='title' value='{$settings["title"]}' placeholder="如：万能wifi">
            	</div>
          	</div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">WIFI入驻二维码</label>
				<div class="col-sm-4">
					{php echo tpl_form_field_image('enter[enter_1]', $settings['enter']['enter_1'])}
				</div>
			</div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">WIFI入驻介绍</label>
				<div class="col-sm-4">
					{php echo tpl_form_field_image('enter[enter_2]', $settings['enter']['enter_2'])}
				</div>
			</div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">WIFI入驻流程</label>
				<div class="col-sm-4">
					{php echo tpl_form_field_image('enter[enter_3]', $settings['enter']['enter_3'])}
				</div>
			</div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">小程序入驻二维码</label>
				<div class="col-sm-4">
					{php echo tpl_form_field_image('enter[enter_4]', $settings['enter']['enter_4'])}
				</div>
			</div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">小程序入驻介绍</label>
				<div class="col-sm-4">
					{php echo tpl_form_field_image('enter[enter_5]', $settings['enter']['enter_5'])}
				</div>
			</div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">小程序入驻流程</label>
				<div class="col-sm-4">
					{php echo tpl_form_field_image('enter[enter_6]', $settings['enter']['enter_6'])}
				</div>
			</div>
			<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">是否免审核</label>
            	<div class="col-sm-9">
                	<label><input type="checkbox" name='autoaudit' {if $settings['autoaudit']}checked{/if} value='1'> 是</label>
                	<div class='help-block'>申请wifi入驻自动审核通过</div>
            	</div>
          	</div>
			<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">剪贴板信息</label>
            	<div class="col-sm-9">
                	<input class='form-control' name='clipboard' value='{$settings["clipboard"]}'>
                	<div class='help-block'>进入小程序首页后，会自动复制 剪贴板信息；用途例如：支付宝红包口令，粉丝进入首页后自动复制，当他打开支付宝后，就会提示领取红包</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">底部版权信息</label>
            	<div class="col-sm-9">
                	<input class='form-control' name='copyright' value='{$settings["copyright"]}'>
            	</div>
          	</div>
          	<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">首页列表广告图</label>
				<div class="col-sm-4">
					{php echo tpl_form_field_image('adv[index]', $settings['adv']['index'])}
					<div class='help-block'>首页列表广告图,大小自适应</div>
				</div>
			</div>
			<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">首页列表跳转appid</label>
            	<div class="col-sm-9">
                	<input class='form-control' name='adv[appid]' value='{$settings["adv"]["appid"]}'>
                	<div class='help-block'>客户点击首页列表广告图，跳转到指定小程序，该小程序必须关联同公众号</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">首页列表跳转页面路径</label>
            	<div class="col-sm-9">
                	<input class='form-control' name='adv[path]' value='{$settings["adv"]["path"]}'>
                	<div class='help-block'>若广告是跳转小程序，则填写小程序页面地址</div>
                	<div class='help-block'>若广告是跳转网页，则填写网页链接，带上https，链接域名需登录小程序管理后台配置域名白名单</div>
            	</div>
          	</div>
          	
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">连接成功默认广告图</label>
				<div class="col-sm-4">
					{php echo tpl_form_field_image('advPic', $settings['advPic'])}
					<div class='help-block'>WiFi连接成功后默认弹窗的广告图,大小自适应</div>
				</div>
			</div>
			<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">连接成功跳转appid</label>
            	<div class="col-sm-9">
                	<input class='form-control' name='adv_appid' value='{$settings["adv_appid"]}'>
                	<div class='help-block'>若 连接成功默认广告图为空，则代表连接成功后，跳转到小程序</div>
                	<div class='help-block'>客户点击广告图，跳转到指定小程序，该小程序必须关联同公众号</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">连接成功跳转页面路径</label>
            	<div class="col-sm-9">
                	<input class='form-control' name='adv_path' value='{$settings["adv_path"]}'>
                	<div class='help-block'>若广告是跳转小程序，则填写小程序页面地址</div>
                	<div class='help-block'>若广告是跳转网页，则填写网页链接，带上https，链接域名需登录小程序管理后台配置域名白名单</div>
            	</div>
          	</div>
			
          	<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">WiFi连接通知模板ID</label>
				<div class="col-sm-9">
					<input class='form-control' name='linkNotice' value='{$settings["linkNotice"]}'>
					<div class='help-block'>首页连接WiFi的消息通知(只限于首页点击wifi列表连接的)</div>
					<div class='help-block'>小程序后台 点开模板消息，搜索 WiFi连接成功通知 ，全勾选</div>
				</div>
			</div>
			
          	<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">WiFi连接通知说明</label>
				<div class="col-sm-9">
					<input class='form-control' name='linkMsg' value='{$settings["linkMsg"]}'>
					<div class='help-block'>上面模板消息通知中的 说明 字段内容</div>
				</div>
			</div>
			
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">WiFi连接成功音效</label>
				<div class="col-sm-9">
					{php echo tpl_form_field_audio('saudio',$settings['saudio'])}
		            <div class='help-block'>前端WIFI连接成功后，播放的音效</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">WiFi连接失败音效</label>
				<div class="col-sm-9">
					{php echo tpl_form_field_audio('faudio',$settings['faudio'])}
		            <div class='help-block'>前端WIFI连接失败后，播放的音效</div>
				</div>
			</div>
			
          	<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">关于我们</label>
				<div class="col-sm-9">
					{php echo tpl_ueditor('aboutus', $settings['aboutus'])}
					<div class='help-block'>点击底部版权时，跳转到关于我们页面</div>
				</div>
			</div>
          	
		</div>
	</div>
	<div class="panel panel-default settings">
	 	<div class="panel-heading">自定义设置</div>
		<div class="panel-body">
			<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label"> 菜单自定义</label>
	            <div class="col-sm-9 col-xs-12">
	            	<label><input type="radio" name="wx_color[switch]" value="0" checked="checked" onclick="$('#model').hide()"> 关闭</label>
					<label style="margin-left: 10px;"><input onclick="$('#model').show()" type="radio" name="wx_color[switch]" value="1" {if $settings['wx_color']['switch']}checked{/if}> 开启</label>
					<div class="help-block">若开启自定义底部菜单，请到底部菜单管理处添加菜单</div>
					<div class="help-block">若不开启自定义底部菜单，将使用小程序固定菜单</div>
				</div>
			</div>
			<div id='model' {if !$settings['wx_color']['switch']}style="display: none;"{/if}>
	          	<div class="form-group">
		            <label class="col-xs-12 col-sm-3 col-md-2 control-label">底部菜单背景颜色</label>
		            <div class="col-sm-9 col-xs-12">
		            	{php echo tpl_form_field_color('wx_color[footer]',$settings['wx_color']['footer']?$settings['wx_color']['footer']:'#D7B872')}
		            	<div class='help-block'>小程序底部菜单背景色</div>
					</div>
				</div>
		 		<div class="form-group">
		            <label class="col-xs-12 col-sm-3 col-md-2 control-label">底部菜单字体颜色</label>
		            <div class="col-sm-9 col-xs-12">
		            	{php echo tpl_form_field_color('wx_color[selfont]',$settings['wx_color']['selfont']?$settings['wx_color']['selfont']:'#f8e0ab')}
		            	<div class='help-block'>小程序底部菜单字体颜色</div>
					</div>
				</div>
				<div class="form-group">
		            <label class="col-xs-12 col-sm-3 col-md-2 control-label">底部菜单选中字体颜色</label>
		            <div class="col-sm-9 col-xs-12">
		            	{php echo tpl_form_field_color('wx_color[font]',$settings['wx_color']['font']?$settings['wx_color']['font']:'#f8e0ab')}
		            	<div class='help-block'>小程序底部菜单选中字体颜色</div>
					</div>
				</div>
			</div>
			<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">程序主色调</label>
	            <div class="col-sm-9 col-xs-12">
	            	{php echo tpl_form_field_color('word[color]',$settings['word']['color']?$settings['word']['color']:'#009aff')}
				</div>
			</div>
			<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">小程序大全标题</label>
	            <div class="col-sm-9 col-xs-12">
	            	<input class="form-control" name="word[app]" type="text" value="{$settings['word']['app']}" placeholder="不填则使用默认值">
				</div>
			</div>
			<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">小程序入驻标题</label>
	            <div class="col-sm-9 col-xs-12">
	            	<input class="form-control" name="word[enter2]" type="text" value="{$settings['word']['enter2']}" placeholder="不填则使用默认值">
				</div>
			</div>
			<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">入驻WIFI标题</label>
	            <div class="col-sm-9 col-xs-12">
	            	<input class="form-control" name="word[enter]" type="text" value="{$settings['word']['enter']}" placeholder="不填则使用默认值">
				</div>
			</div>
			<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">会员中心标题</label>
	            <div class="col-sm-9 col-xs-12">
	            	<input class="form-control" name="word[user]" type="text" value="{$settings['word']['user']}" placeholder="不填则使用默认值">
				</div>
			</div>
		</div>
	</div>
	<div class="panel panel-default settings">
	 	<div class="panel-heading">分享设置</div>
		<div class="panel-body">
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">首页分享标题</label>
				<div class="col-sm-4">
					<input class="form-control" name="share[indexShare]" type="text" value="{$settings['share']['indexShare']}">
				</div>
			</div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">首页分享图</label>
				<div class="col-sm-4">
					{php echo tpl_form_field_image('share[indexPic]', $settings['share']['indexPic'])}
				</div>
			</div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">小程序列表分享标题</label>
				<div class="col-sm-4">
					<input class="form-control" name="share[appletShare]" type="text" value="{$settings['share']['appletShare']}">
				</div>
			</div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">首页列表广告图</label>
				<div class="col-sm-4">
					{php echo tpl_form_field_image('share[appletPic]', $settings['share']['appletPic'])}
				</div>
			</div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">小程序入驻分享标题</label>
				<div class="col-sm-4">
					<input class="form-control" name="share[applyShare]" type="text" value="{$settings['share']['applyShare']}">
				</div>
			</div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">小程序入驻分享图</label>
				<div class="col-sm-4">
					{php echo tpl_form_field_image('share[applyPic]', $settings['share']['applyPic'])}
				</div>
			</div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">WIFI入驻分享标题</label>
				<div class="col-sm-4">
					<input class="form-control" name="share[enterShare]" type="text" value="{$settings['share']['enterShare']}">
				</div>
			</div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">WIFI入驻分享图</label>
				<div class="col-sm-4">
					{php echo tpl_form_field_image('share[enterPic]', $settings['share']['enterPic'])}
				</div>
			</div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">会员中心分享标题</label>
				<div class="col-sm-4">
					<input class="form-control" name="share[userShare]" type="text" value="{$settings['share']['userShare']}">
				</div>
			</div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">会员中心分享图</label>
				<div class="col-sm-4">
					{php echo tpl_form_field_image('share[userPic]', $settings['share']['userPic'])}
				</div>
			</div>
          </div>
	</div>
	<div class="panel panel-default settings">
	 	<div class="panel-heading">审核设置</div>
	 	<div class="panel-body">
			<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">审核中版本号</label>
            	<div class="col-sm-9">
                	<input class='form-control' name='version' value='{$settings["version"]}' placeholder="审核中版本号">
                	<div class="help-block">程序提交审核时的版本号，若小程序中的版本号跟这里版本号相同，则会隐藏底部菜单，避免影响正式运营的小程序</div>
                	<div class="help-block">提交审核时，功能页面选择第一个，服务类目选择：IT，硬件与设备</div>
            	</div>
          	</div>
	        <div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">通过审核后操作</label>
            	<div class="col-sm-9">
                	<div class="help-block">每次审核通过后，把上面的版本号改成 {php echo number_format($settings["version"]+1,1)} ；然后去发布小程序</div>
            	</div>
          	</div>
		</div>
	</div>
	<div class="panel panel-default settings">
	 	<div class="panel-heading">七牛存储设置(<a style="color: blue;" href="https://portal.qiniu.com/signup?code=3lqwolzszfcya" target="_blank">七牛官网</a>-->个人面板-->秘钥管理)</div>
		 	<div class="panel-body">
		 		<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label"> 七牛存储</label>
	            <div class="col-sm-9 col-xs-12">
	            	<label><input type="radio" name="qiniu[isqiniu]" value="0" checked="checked"> 关闭</label>
					<label style="margin-left: 10px;"><input type="radio" name="qiniu[isqiniu]" value="1" {if $settings['qiniu']['isqiniu']}checked{/if}> 开启</label>
					<div class="help-block">若使用七牛存储，请完善下面信息</div>
					<div class="help-block">若不使用七牛存储，请在模块根目录(addons/junsion_wifinav/)下创建文件夹pics,并给与777权限</div>
				</div>
			</div>
			<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label"> Access KEY</label>
	            <div class="col-sm-9 col-xs-12">
					<input type="text" class="form-control" name="qiniu[access_key]" value="{$settings['qiniu']['access_key']}">
				</div>
			</div>
			 <div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">Secret Key</label>
	            <div class="col-sm-9 col-xs-12">
					<input type="text" class="form-control" name="qiniu[secret_key]" value="{$settings['qiniu']['secret_key']}">
				</div>
			</div>
			<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label"> 空间名称</label>
	            <div class="col-sm-9 col-xs-12">
					<input type="text" class="form-control" name="qiniu[bucket]" value="{$settings['qiniu']['bucket']}">
					<div class="help-block">七牛首页——>七牛官方资源——>添加 对象存储——>输入空间名称和选择公开空间,空间选择<font style="color: red;">华东</font></div>
				</div>
			</div>
			<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label"> 对象域名</label>
	            <div class="col-sm-9 col-xs-12">
					<input type="text" class="form-control" name="qiniu[qiniuUrl]" value="{$settings['qiniu']['qiniuUrl']}">
					<div class="help-block">请带上http://</div>
					<div class="help-block">七牛首页——>七牛官方资源——>点开对象存储，可看到域名设置内的七牛测试域名(多个的随机一个)</div>
				</div>
			</div>
        </div>
	</div>
	<button type="submit" class="btn btn-primary" name="submit" value="提交">保存</button>
	<input type="hidden" name="token" value="{$_W['token']}" />
</form>
{template 'common/footer'}
